package com.cuckoo.mall.thus.menuaccount.recently;

import com.bgn.baseframe.base.BasePresenterImpl;
import com.bgn.baseframe.network.HttpObserver;
import com.bgn.baseframe.network.bean.TDataBean;
import com.cuckoo.mall.javabean.Goods;
import com.cuckoo.mall.javabean.Product;
import com.cuckoo.mall.network.ApiManager;

import java.util.List;


/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class RecentlyPresenter extends BasePresenterImpl<RecentlyContract.View> implements RecentlyContract.Presenter {

    @Override
    public void getRecentlyList(final int loadType, int page_index, int page_count) {
        ApiManager.getRecentlyViewdList(page_index, page_count).subscribe(new HttpObserver<TDataBean<List<Product>>>(mView) {
            @Override
            public void onSucceed(TDataBean<List<Product>> value) {
                mView.whenGetData(value.getData(), loadType);
            }
        });
    }
}
